package com.wzq.app.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.wzq.app.R;
import com.wzq.app.model.EvaModel;
import com.wzq.app.model.UserListModel;

import java.util.List;


/**
 * @ProjectName: wzq
 * @Package: com.wzq.app.adapter
 * @ClassName: UserAdapter
 * @Description: java类作用描述
 * @Author: Tao.xiaolong
 * @CreateDate: 2021/2/24 15:11
 * @UpdateUser: 更新者：
 * @UpdateDate: 2021/2/24 15:11
 * @UpdateRemark: 更新说明：
 * @Version: 1.0
 */
public class EvaAdapter extends BaseAdapter {

    List<EvaModel> modelList;
    LayoutInflater inflater;

    public EvaAdapter(List<EvaModel> list, Context context) {
        this.modelList = list;
        this.inflater = LayoutInflater.from(context);
    }

    @Override
    public int getCount() {
        return modelList.size();
    }

    @Override
    public Object getItem(int position) {
        return modelList.get(position);
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View view = inflater.inflate(R.layout.eva_item, parent, false);
        TextView textView = view.findViewById(R.id.name);
        textView.setText("来自"+modelList.get(position).getEvaName()+"的评价");
        return view;
    }
}
